
<template>
  <el-container>
    <!-- 顶部栏 -->
    <el-header style=" font-size: 25px;">
      <el-icon class=" is-loading" size="25px">
        <ChromeFilled />
      </el-icon>
      测试平台
      <div style="padding-left: 1400px;padding-top: 1px;size: 30px;">
        <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" />
      </div>
    </el-header>

    <el-container>
      <el-aside width="150px">
        <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
          <el-sub-menu index="1">
            <template #title>
              <el-icon class="is-loading">
                <location />
              </el-icon>
              <span>接口测试</span>
            </template>
            <el-menu :default-active="activeIndex2" class="el-menu-demo" @select="handleSelect">
              <el-menu-item style="font-size: 15px;" index="1" @click="goTo('/index/testcase')">
                <el-icon size="15px" class="is-loading">
                  <FullScreen />
                </el-icon>
                测试用例
              </el-menu-item>
              <el-menu-item style="font-size: 15px;" index="11" @click="goTo('/index/task')">
                <el-icon size="15px" class="is-loading">
                  <HelpFilled />
                </el-icon>
                测试任务
              </el-menu-item>
            </el-menu>
          </el-sub-menu>


        </el-menu>






      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import { UserFilled } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'
import { Setting } from '@element-plus/icons-vue'

const router = useRouter()

const goTo = (path) => {
  router.push(path)
}
</script>

<style scoped>
.el-container {
  height: 100%;
}

.el-header {
  padding: 0;
}

.el-aside>ul {
  height: 100%;
}

.flex-grow {
  flex-grow: 1;
}


.el-main {
  overflow: hidden;
}


.demo-type {
  display: flex;
}

.demo-type>div {
  flex: 1;
  text-align: center;
}

.demo-type>div:not(:last-child) {
  border-right: 1px solid var(--el-border-color);
}
</style>